package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.entity.UserModel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author liudo
 * @version 1.0
 * @project mybatis-plus-quick-start
 * @date 2023/12/22 09:37:06
 */
@Mapper
public interface UserMapper extends BaseMapper<UserModel> {

    @Select("select age, count(*) count from user where deleted = 0 group by age")
    List<Map<String, Object>> selectMapsGroupByAge();
}
